import VueRouter from 'vue-router'


import HomeComponent from './components/tabbar/HomeContainer.vue'
import MemberComponent from './components/tabbar/MemberContainer.vue'
import SearchComponent from './components/tabbar/SearchContainer.vue'
import ShopComponent from './components/tabbar/ShopcarContainer.vue'
import NewsListComponent from './components/news/NewsList.vue'
import NessInfoConpoment from './components/news/NewsInfo.vue'
import PhotoListConpoment from './components/photos/PhotoList.vue'



// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    { path: '/', redirect: '/home' },
    {path:'/home', component:HomeComponent},
    {path:'/member', component:MemberComponent},
    {path:'/shopcar', component:ShopComponent},
    {path:'/sarech', component:SearchComponent},
    {path:'/home/newslist', component:NewsListComponent},
    {path:'/home/newsinfo/:id', component:NessInfoConpoment},
    {path:'/home/phtotlist', component:PhotoListConpoment},
  ],
  linkActiveClass : 'mui-active'  // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
})

// 把路由对象暴露出去
export default router